Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6896105
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T06:59:34+00:00 2026-05-27T06:59:34+00:00

My question is similar to this one Multiply a 3D matrix with a 2D

  • 0

My question is similar to this one Multiply a 3D matrix with a 2D matrix. However, I’m coding in Fortran.

Say, if I have a RxSxT matrix A and an SxU matrix B, where R,S,T,U are integers, and I want to multiply A(:,:,0) with B. How can I do this with matmul? When I do something like

    C(:,:,0) = matmul(A(:,:,0),B)

The compiler (gfortran) gives:

    Warning:Array reference at (1) is out of bounds (0 < 1) in dimension 3 
    f951: internal compiler error: Segmentation fault

Is there a way around this?
Thanks.

EDIT: I should add that I’m actually transposing the second matrix. Say, A a RxSxT matrix and B a UxS matrix. Then

 C(:,:,0) = matmul(B,transpose(A(:,:,0))

That transpose might be part of the problem. Does it convert A(i,j,k) to A(k,i,j)?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T06:59:35+00:00Added an answer on May 27, 2026 at 6:59 am

    transpose (A(:,:,0)) should interchange the indices A(i,j,0) to A(j,i,0). A(:,:,0) is a rank two matrix.

    The compiler should never crash, whether or not the input source code is correct. Are you using the latest version of gfortran? You could report this “internal compiler error: Segmentation fault” to the gfortran development team: http://gcc.gnu.org/wiki/GFortran#bugs

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a similar question to this one SQL products/productsales I want to do
My question is similar to this one but for a Rails app. I have
This question is similar to this one How do I add options to a
My question is similar to this one , but I would like to replicate
My question is similar to this one but none of the answers solve my
My question is similar to this one , but I can simplify it some.
Similar question as this one but for a Microsoft Environment. Email --> Exchange Server
This question is similar to this other one , with the difference that the
This is almost similar question to this one: - Dealing with timezones in PHP
This is a similar question to this one . I would like to convert

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.