Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
openfoam
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Development
openfoam
Commits
f6f9eb14
Commit
f6f9eb14
authored
13 years ago
by
mattijs
Browse files
Options
Downloads
Patches
Plain Diff
ENH: settings.sh: MPI_ROOT checking
parent
4819b9a0
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
etc/config/settings.csh
+23
-1
23 additions, 1 deletion
etc/config/settings.csh
etc/config/settings.sh
+21
-0
21 additions, 0 deletions
etc/config/settings.sh
with
44 additions
and
1 deletion
etc/config/settings.csh
+
23
−
1
View file @
f6f9eb14
...
...
@@ -487,9 +487,31 @@ case QSMPI:
breaksw
case
SGIMPI:
setenv FOAM_MPI
${
MPI_ROOT
##*/
}
if
(
!
$?
MPI_ROOT
)
setenv MPI_ROOT /dummy
if
(
!
-d
"
$MPI_ROOT
"
)
then
echo
"Warning in
$WM_PROJECT_DIR
/etc/config/settings.csh:"
echo
" MPI_ROOT not a valid mpt installation directory."
echo
" Please set MPI_ROOT to the mpt installation directory."
echo
" (usually done by loading the mpt module)"
echo
" MPI_ROOT currently set to '
$MPI_ROOT
'"
endif
if
(
"
${
MPI_ROOT
:h
}
/"
==
$MPI_ROOT
)
then
setenv MPI_ROOT
${
MPI_ROOT
:h
}
endif
setenv FOAM_MPI
${
MPI_ROOT
:t
}
setenv MPI_ARCH_PATH
$MPI_ROOT
if
(
$?
FOAM_VERBOSE
&&
$?
prompt
)
then
echo
"Using SGI MPT:"
echo
" MPI_ROOT :
$MPI_ROOT
"
echo
" FOAM_MPI :
$FOAM_MPI
"
endif
_foamAddPath
$MPI_ARCH_PATH
/bin
_foamAddLib
$MPI_ARCH_PATH
/lib
breaksw
...
...
This diff is collapsed.
Click to expand it.
etc/config/settings.sh
+
21
−
0
View file @
f6f9eb14
...
...
@@ -511,9 +511,30 @@ QSMPI)
;;
SGIMPI
)
lastCharID
=
$((
${#
MPI_ROOT
}
-
1
))
if
[
"
${
MPI_ROOT
:
$lastCharID
:1
}
"
==
'/'
]
then
MPI_ROOT
=
${
MPI_ROOT
:0:
$lastCharID
}
fi
export
FOAM_MPI
=
${
MPI_ROOT
##*/
}
export
MPI_ARCH_PATH
=
$MPI_ROOT
if
[
-d
"
$MPI_ROOT
"
-o
-z
"
$MPI_ARCH_PATH
"
]
then
echo
"Warning in
$WM_PROJECT_DIR
/etc/config/settings.sh:"
1>&2
echo
" MPI_ROOT not a valid mpt installation directory or ending in a '/'."
1>&2
echo
" Please set MPI_ROOT to the mpt installation directory."
1>&2
echo
" MPI_ROOT currently set to '
$MPI_ROOT
'"
1>&2
fi
if
[
"
$FOAM_VERBOSE
"
-a
"
$PS1
"
]
then
echo
"Using SGI MPT:"
echo
" MPI_ROOT :
$MPI_ROOT
"
echo
" FOAM_MPI :
$FOAM_MPI
"
fi
_foamAddPath
$MPI_ARCH_PATH
/bin
_foamAddLib
$MPI_ARCH_PATH
/lib
;;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment