Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

conda MacOSX issues and Github actions #547

Closed
apcraig opened this issue Dec 18, 2020 · 7 comments · Fixed by #750
Closed

conda MacOSX issues and Github actions #547

apcraig opened this issue Dec 18, 2020 · 7 comments · Fixed by #750

Comments

@apcraig
Copy link
Contributor

apcraig commented Dec 18, 2020

Recently, we ran into some problems with conda on Mac OSX. This is probably related to a change in the conda compiler distribution. In the end, we needed to add -lgcc_eh to get CICE to compile with OpenMP but without MPI (i.e. -p 1x2).

A Forum topic was added to provide some guidance to the community, https://bb.cgd.ucar.edu/cesm/threads/conda-port-issues.5795/

Should we do anything about this in our documentation or implementation.

As an aside, @phil-blain used Github Actions to test the setup and verified the same issue as seen on an actual Mac OSX system. Should we be leveraging Github Actions or a similar cloud/container tool to test additional platforms and/or versions of systems/compilers/etc?

https://github.com/phil-blain/CICE-conda/runs/1573686932

@phil-blain
Copy link
Member

Just want to add for @JFLemieux73 who might me reading that I'm working on that in my own time (not for work). CICE is open-source after all :)

@phil-blain
Copy link
Member

I just opened an issue in the conda-forge repo where the conda-forge gfortran is built:
conda-forge/gfortran_impl_osx-64-feedstock#36

I managed to isolate the problem to the "threadprivate" directive used in the 1D EVP implementation.

@phil-blain
Copy link
Member

This has been fixed in conda-forge. Recreating the "cice" env should install the new build of gfortran from conda-forge and this should not require -lgcc_eh at link time. See for example this successful run: https://github.com/phil-blain/conda-forge-macos-gfortran-openmp-bug/runs/1591889588?check_suite_focus=true

@apcraig
Copy link
Contributor Author

apcraig commented Dec 23, 2020

I can confirm that conda works for me again. Big thanks @phil-blain for leading the effort to resolve the problem!

Do we want to discuss using github actions (or similar) to supplement testing? Or should this be closed for now.

@phil-blain
Copy link
Member

I think it could be a good idea, eventually.

@eclare108213
Copy link
Contributor

eclare108213 commented Dec 29, 2020

I started from the instructions here and didn't get very far:

bash-3.2$ which conda
bash-3.2$ curl -l https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86-64.sh -o ~/Downloads/miniconda.sh
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 379 100 379 0 0 796 0 --:--:-- --:--:-- --:--:-- 794
bash-3.2$ bash ~/Downloads/miniconda.sh
/Users/eclare/Downloads/miniconda.sh: line 1: syntax error near unexpected token `newline'

macOS Catalina version 10.15.7

Edit with more info: the contents of the miniconda.sh file is an html "not found" page (click on the url above to go there). Ah, there's a typo... I'll keep working on this.

Edit later: Still having problems

bash-3.2$ bash ~/Downloads/miniconda.sh
[...follow instructions...]
Preparing transaction: done
Executing transaction: done
Traceback (most recent call last):
File "/Users/eclare/miniconda3/pkgs/.cio-config.py", line 83, in
main()
File "/Users/eclare/miniconda3/pkgs/.cio-config.py", line 76, in main
for fn in os.listdir(dir_path):
PermissionError: [Errno 1] Operation not permitted: '/Users/eclare/Downloads'
bash-3.2$ which conda
bash-3.2$
bash-3.2$ ls -l
drwx------@ 120 eclare staff 3840 Dec 29 12:16 Downloads

Continuing edit: The problem is with the permissions of the Downloads folder. An easy workaround is to do the installation in ~/. instead of ~/Downloads. That worked for me and might be worth noting in the doc. On to the next step...

@phil-blain
Copy link
Member

phil-blain commented Dec 30, 2020

Yeah, should be x86_64 and not x86-64 (underscore instead of dash). The doc is OK.

Regarding the permission problem, that looks like a new security feature in Catalina: https://support.apple.com/en-ie/guide/mac-help/mchld5a35146/10.15/mac/10.15. In that light I agree we should change the command so that the installer is downloaded directly to $HOME to work around that problem.

- # Download the Miniconda installer to ~/Downloads/miniconda.sh
- curl -L https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -o ~/Downloads/miniconda.sh
+ # Download the Miniconda installer to ~/miniconda.sh
+ curl -L https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -o ~/miniconda.sh
# Install Miniconda
- bash ~/Downloads/miniconda.sh
+ bash ~/miniconda.sh

apcraig added a commit to apcraig/CICE that referenced this issue Aug 10, 2022
apcraig added a commit that referenced this issue Aug 15, 2022
* Update/improve debug_blocks output, see #718.

* Add ICE_MEMUSE cice.settings flag for batch memory use
Add set_env.memsmall, memmed, memlarge options
To use, will require changes to the env machine files.  Most machines will probably not use it.
See #674.

* Add setup_machparams.csh to compute batch/launch machine parameters
Update cice.batch.csh and cice.launch.csh to use setup_machparams.csh
See #650

* Update subroutine diagnostic_abort which calls print_state
Update ice_transport_remap and ice_transport_driver to call diagnostic_abort
  during some errors.
See also #622

* Update miniconda install information
See #547

* Code cleanup based on compile with -Wall
Code cleanup based on -std f2003 and f2008 checks
Add -stand f08 to cheyenne_intel debug flags
Add -std f2008 to cheyenne_gnu debug flags
Code consistent with Fortran 2003 except for use of contiguous in
  1d evp code.

* Remove all trailing blank space with script

* Update the cheyenne env so qc testing works
Add configuration/scripts/tests/qctest.yml file
Update documentation

* Update Icepack

* Clean up some output

* fix comments

* update print_state output
dabail10 pushed a commit to ESCOMP/CICE that referenced this issue Oct 4, 2022
* Update/improve debug_blocks output, see CICE-Consortium#718.

* Add ICE_MEMUSE cice.settings flag for batch memory use
Add set_env.memsmall, memmed, memlarge options
To use, will require changes to the env machine files.  Most machines will probably not use it.
See CICE-Consortium#674.

* Add setup_machparams.csh to compute batch/launch machine parameters
Update cice.batch.csh and cice.launch.csh to use setup_machparams.csh
See CICE-Consortium#650

* Update subroutine diagnostic_abort which calls print_state
Update ice_transport_remap and ice_transport_driver to call diagnostic_abort
  during some errors.
See also CICE-Consortium#622

* Update miniconda install information
See CICE-Consortium#547

* Code cleanup based on compile with -Wall
Code cleanup based on -std f2003 and f2008 checks
Add -stand f08 to cheyenne_intel debug flags
Add -std f2008 to cheyenne_gnu debug flags
Code consistent with Fortran 2003 except for use of contiguous in
  1d evp code.

* Remove all trailing blank space with script

* Update the cheyenne env so qc testing works
Add configuration/scripts/tests/qctest.yml file
Update documentation

* Update Icepack

* Clean up some output

* fix comments

* update print_state output
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants