Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • openfoam openfoam
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 426
    • Issues 426
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 8
    • Merge requests 8
  • Deployments
    • Deployments
    • Releases
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Development
  • openfoamopenfoam
  • Issues
  • #1667
Closed
Open
Issue created Apr 06, 2020 by Alexey Matveichev@alexey

etc/cshrc on Mac OS X

Summary

etc/cshrc does not work on Mac OS X.

  1. Original version exists with
% source etc/cshrc 
sed: 1: "s@^[^/]*@@;\@/OpenFOAM[ ...": extra characters at the end of q command
Error: did not locate installation path for OpenFOAM-v1912
No directory: 
  1. It sets up LD_LIBRARY_PATH instead of DYLD_LIBRARY_PATH.

Steps to reproduce

source etc/cshrc

What is the current bug behaviour?

Error:

sed: 1: "s@^[^/]*@@;\@/OpenFOAM[ ...": extra characters at the end of q command
Error: did not locate installation path for OpenFOAM-v1912
No directory: 

What is the expected correct behavior?

  1. Environment is set up.
  2. DYLD_LIBRARY_PATH is set instead of LD_LIBRARY_PATH.

Environment information

  • OpenFOAM version : 1912
  • Operating system : Mac OS X (10.15.4)
  • tcsh version : tcsh 6.21.00 (Astron) 2019-05-08 (x86_64-apple-darwin) options wide,nls,dl,bye,al,kan,sm,rh,color,filec

Possible fixes

  1. sed issue can be fixed by adding ; after q command. I.e.
set projectDir=`lsof +p $$ |& \
    sed -ne 's@^[^/]*@@;\@/'"$projectName"'[^/]*/etc/cshrc@{s@/etc/cshrc.*@@p; q; }'`

On Linux (tested on Ubuntu 19.10) this addition does not change behaviour.

  1. Use DYLD_LIBRARY_PATH on Mac OS X. I have tried to fix the issue, see attached config.csh.patch. Not sure if it conforms with tcsh programming style guide. Also it is not quite clean what to do if system Open MPI is installed in /usr/local/...: it is added to [DY]LD_LIBRARY_PATH during environment setup but is not cleaned during wmUnset.

As a side-note: etc/cshrc works only in tcsh. With real csh (Ubuntu's 20110502-5, which is based on csh from OpenBSD source tree) it exits with Invalid null command. error.

Assignee
Assign to
Time tracking