C++ tool inside Singularity container: direct execution fine but execution within Bash script inside same container crashes with illegal instructionPreserving whitespaces in a string as a command line argumentbash shell script for reading a fields in a file and producing commandsBash script containing binary executableHow to setup a “module” command in unix to add software package to $PATH?Bash script behaves differently from Docker run command instead of inside container itself?How do I wrap a compiled command line tool for use in Ruby?bash script to perform action in a singularity container it opensPass a string of arguments to a “docker run imagefile”How to run a jupyter notebook using a singularity image?Docker exec cannot execute script inside container
Is time complexity more important than space complexity?
A life of PhD: is it feasible?
What's the relation between у.е. to USD?
How can calculate the turn-off time of an LDO?
Was the Lonely Mountain, where Smaug lived, a volcano?
Fastest way from 8 to 7
What does BREAD stand for while drafting?
usage of mir gefallen
Is fission/fusion to iron the most efficient way to convert mass to energy?
Am I allowed to determine tenets of my contract as a warlock?
Changing the PK column of a data extension without completely recreating it
What do you call the action of "describing events as they happen" like sports anchors do?
Keeping track of theme when improvising
Is Jesus the last Prophet?
Jam with honey & without pectin has a saucy consistency always
Idiom for 'person who gets violent when drunk"
Realistic, logical way for men with medieval-era weaponry to compete with much larger and physically stronger foes
Purpose of cylindrical attachments on Power Transmission towers
I sent an angry e-mail to my interviewers about a conflict at my home institution. Could this affect my application?
Remove the small black rectangle that appears at the end of environment
Must a CPU have a GPU if the motherboard provides a display port (when there isn't any separate video card)?
Are skill challenges an official option or homebrewed?
Does WiFi affect the quality of images downloaded from the internet?
Simple log rotation script
C++ tool inside Singularity container: direct execution fine but execution within Bash script inside same container crashes with illegal instruction
Preserving whitespaces in a string as a command line argumentbash shell script for reading a fields in a file and producing commandsBash script containing binary executableHow to setup a “module” command in unix to add software package to $PATH?Bash script behaves differently from Docker run command instead of inside container itself?How do I wrap a compiled command line tool for use in Ruby?bash script to perform action in a singularity container it opensPass a string of arguments to a “docker run imagefile”How to run a jupyter notebook using a singularity image?Docker exec cannot execute script inside container
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
I'm facing a weird issue when running a C++ executable (Gromacs tool editconf) that was cross-compiled inside a Singularity container. The container was built on my local machine and transferred to a small computing cluster where I observe the following:
When I directly execute the Gromacs command ("gmx editconf" with a couple of arguments), it works fine:
singularity exec image.simg gmx editconf -bt octahedron -f complex.pdb -o complex.pdb -box 8
But as soon as I try to execute it via a Bash script inside the container
singularity exec image.simg /bin/bash /opt/prep_stuff.sh $ARG1 $ARG2
which in turn executes the Gromacs tool like this
gmx editconf -bt octahedron -f complex.pdb -o complex.pdb -box 8
it crashes with the error
/opt/prep_stuff.sh: line 109: 27326 Illegal instruction (core dumped) gmx editconf -bt octahedron -f complex.pdb -o complex.pdb -box 8
while all the other steps in that Bash script are correctly carried out. Also, line 109 (begin of a for loop) appears far before the actual call of gmx editconf
.
Does anyone have an idea about why the two approaches behave that differently although executed on the same machine? I need it to work following the Bash script approach.
Many thanks!
c++ bash cluster-computing singularity-container
add a comment |
I'm facing a weird issue when running a C++ executable (Gromacs tool editconf) that was cross-compiled inside a Singularity container. The container was built on my local machine and transferred to a small computing cluster where I observe the following:
When I directly execute the Gromacs command ("gmx editconf" with a couple of arguments), it works fine:
singularity exec image.simg gmx editconf -bt octahedron -f complex.pdb -o complex.pdb -box 8
But as soon as I try to execute it via a Bash script inside the container
singularity exec image.simg /bin/bash /opt/prep_stuff.sh $ARG1 $ARG2
which in turn executes the Gromacs tool like this
gmx editconf -bt octahedron -f complex.pdb -o complex.pdb -box 8
it crashes with the error
/opt/prep_stuff.sh: line 109: 27326 Illegal instruction (core dumped) gmx editconf -bt octahedron -f complex.pdb -o complex.pdb -box 8
while all the other steps in that Bash script are correctly carried out. Also, line 109 (begin of a for loop) appears far before the actual call of gmx editconf
.
Does anyone have an idea about why the two approaches behave that differently although executed on the same machine? I need it to work following the Bash script approach.
Many thanks!
c++ bash cluster-computing singularity-container
ok, i just changed the compiler flag to a low SIMD level (SSE2) and now it works. however, i'm still wondering, why one of the two approaches (without intermediate bash script) ran on the same cluster without having set the compiler flag to some low optimization level.
– user3305567
Mar 25 at 14:15
add a comment |
I'm facing a weird issue when running a C++ executable (Gromacs tool editconf) that was cross-compiled inside a Singularity container. The container was built on my local machine and transferred to a small computing cluster where I observe the following:
When I directly execute the Gromacs command ("gmx editconf" with a couple of arguments), it works fine:
singularity exec image.simg gmx editconf -bt octahedron -f complex.pdb -o complex.pdb -box 8
But as soon as I try to execute it via a Bash script inside the container
singularity exec image.simg /bin/bash /opt/prep_stuff.sh $ARG1 $ARG2
which in turn executes the Gromacs tool like this
gmx editconf -bt octahedron -f complex.pdb -o complex.pdb -box 8
it crashes with the error
/opt/prep_stuff.sh: line 109: 27326 Illegal instruction (core dumped) gmx editconf -bt octahedron -f complex.pdb -o complex.pdb -box 8
while all the other steps in that Bash script are correctly carried out. Also, line 109 (begin of a for loop) appears far before the actual call of gmx editconf
.
Does anyone have an idea about why the two approaches behave that differently although executed on the same machine? I need it to work following the Bash script approach.
Many thanks!
c++ bash cluster-computing singularity-container
I'm facing a weird issue when running a C++ executable (Gromacs tool editconf) that was cross-compiled inside a Singularity container. The container was built on my local machine and transferred to a small computing cluster where I observe the following:
When I directly execute the Gromacs command ("gmx editconf" with a couple of arguments), it works fine:
singularity exec image.simg gmx editconf -bt octahedron -f complex.pdb -o complex.pdb -box 8
But as soon as I try to execute it via a Bash script inside the container
singularity exec image.simg /bin/bash /opt/prep_stuff.sh $ARG1 $ARG2
which in turn executes the Gromacs tool like this
gmx editconf -bt octahedron -f complex.pdb -o complex.pdb -box 8
it crashes with the error
/opt/prep_stuff.sh: line 109: 27326 Illegal instruction (core dumped) gmx editconf -bt octahedron -f complex.pdb -o complex.pdb -box 8
while all the other steps in that Bash script are correctly carried out. Also, line 109 (begin of a for loop) appears far before the actual call of gmx editconf
.
Does anyone have an idea about why the two approaches behave that differently although executed on the same machine? I need it to work following the Bash script approach.
Many thanks!
c++ bash cluster-computing singularity-container
c++ bash cluster-computing singularity-container
edited Mar 25 at 7:28
user3305567
asked Mar 25 at 0:19
user3305567user3305567
83
83
ok, i just changed the compiler flag to a low SIMD level (SSE2) and now it works. however, i'm still wondering, why one of the two approaches (without intermediate bash script) ran on the same cluster without having set the compiler flag to some low optimization level.
– user3305567
Mar 25 at 14:15
add a comment |
ok, i just changed the compiler flag to a low SIMD level (SSE2) and now it works. however, i'm still wondering, why one of the two approaches (without intermediate bash script) ran on the same cluster without having set the compiler flag to some low optimization level.
– user3305567
Mar 25 at 14:15
ok, i just changed the compiler flag to a low SIMD level (SSE2) and now it works. however, i'm still wondering, why one of the two approaches (without intermediate bash script) ran on the same cluster without having set the compiler flag to some low optimization level.
– user3305567
Mar 25 at 14:15
ok, i just changed the compiler flag to a low SIMD level (SSE2) and now it works. however, i'm still wondering, why one of the two approaches (without intermediate bash script) ran on the same cluster without having set the compiler flag to some low optimization level.
– user3305567
Mar 25 at 14:15
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55329868%2fc-tool-inside-singularity-container-direct-execution-fine-but-execution-withi%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55329868%2fc-tool-inside-singularity-container-direct-execution-fine-but-execution-withi%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
ok, i just changed the compiler flag to a low SIMD level (SSE2) and now it works. however, i'm still wondering, why one of the two approaches (without intermediate bash script) ran on the same cluster without having set the compiler flag to some low optimization level.
– user3305567
Mar 25 at 14:15