Jump to content

RexLee

Member
  • Posts

    132
  • Joined

  • Last visited

Awards

This user doesn't have any awards

  1. So what does this error code mean and how should I fix it?
  2. #include <iostream> #include <cstdio> #include <string> #include <fstream> #include <mpi.h> double t1, t2; int main(int argc, char* argv[]) { MPI_Init(NULL, NULL); int numProc; MPI_Comm_size(MPI_COMM_WORLD, &numProc); int rank; MPI_Comm_rank(MPI_COMM_WORLD, &rank); int N; std::string input; N = atoi(argv[1]); input = argv[2]; t1 = MPI_Wtime(); MPI_File fh; MPI_File_open(MPI_COMM_WORLD, input.c_str(), MPI_MODE_RDONLY, MPI_INFO_NULL, &fh); long long filesize; MPI_File_get_size(fh, &filesize); int bufsize = filesize / numProc; int nints = bufsize / sizeof(float); float* num = (float*)malloc(sizeof(float) * nints); MPI_File_seek(fh, rank * bufsize, MPI_SEEK_SET); MPI_File_read(fh, num, nints, MPI_FLOAT, NULL); MPI_File_close(&fh); t2 = MPI_Wtime(); if(rank == 0) { std::cout.precision(16); std::cout << (double)t2 - t1 << std::endl; } MPI_Finalize(); return 0; } The input file is a binary file. This is the error code. =================================================================================== = BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES = PID 28932 RUNNING AT apollo31 = EXIT CODE: 11 = CLEANING UP REMAINING PROCESSES = YOU CAN IGNORE THE BELOW CLEANUP MESSAGES =================================================================================== This message occurs at MPI_File_read, it works on my computer but not on the server I tested it on.
  3. As you can see the shadow positions are wrong. lightSpace = lightSpaceMatrix * model * vec4(position, 1.0); LightSpace in vertex shader. vec3 projCoords = fragPosLightSpace.xyz / fragPosLightSpace.w; projCoords = projCoords * 0.5 + 0.5; Perspective divide and make sure range is between [0, 1] in fragment shader. glm::vec3 lightPos(20.0, 20.00, 20.0); glm::vec3 lightColor(1000.0, 1000.0, 1000.0); glm::mat4 lightProjection, lightView; glm::mat4 lightSpaceMatrix; lightProjection = glm::frustum(-1.0f, 1.0f, -1.0f, 1.0f, 1.0f, 100000.0f); lightView = glm::lookAt(lightPos, glm::vec3(0.0f), glm::vec3(0.0, 1.0, 0.0)); lightSpaceMatrix = lightProjection * lightView; Lighting matrix setup in main. Depth map is 4096 * 4096, I have checked that it is correct, and I have used glViewport to change the render window. What am I doing wrong here?
  4. Oh I get it now. I thought it was the whole folder that was wrong. Thanks~
  5. Thanks it worked after I deleted the .ds_store file. Why does it cause the error though? Isn't /Users/rexlee/Desktop/A a folder when I pass it?
  6. I'm not sure. What I entered into the terminal was: python combine_A_and_B.py --fold_A /Users/rexlee/Desktop/A --fold_B /Users/rexlee/Desktop/B --fold_AB /Users/rexlee/Desktop/AB
  7. Yes this is what the folder looks like from finder.
  8. I am running this code here. Even though I am giving the full path(/Users/rexlee/Desktop/A) to the parser it gives me: NotADirectoryError: [Errno 20] Not a directory: '/Users/rexlee/Desktop/Learn/A/.DS_Store' Why is it not able to find the directory.
  9. No this is the first time I used cython.
  10. I am trying to make a file from Intrinsic Images in the Wild. Error compiling Cython file: ------------------------------------------------------------ ... # distutils: sources = src/densecrf_wrapper.cpp ^ ------------------------------------------------------------ krahenbuhl2013.pyx:1:0: 'intrinsic-master.bell2014.krahenbuhl2013.krahenbuhl2013' is not a valid module name Traceback (most recent call last): File "setup.py", line 29, in <module> language="c++", File "//anaconda/envs/py27/lib/python2.7/site-packages/Cython/Build/Dependencies.py", line 934, in cythonize cythonize_one(*args) File "//anaconda/envs/py27/lib/python2.7/site-packages/Cython/Build/Dependencies.py", line 1056, in cythonize_one raise CompileError(None, pyx_file) Cython.Compiler.Errors.CompileError: krahenbuhl2013.pyx make: *** [all] Error 1
  11. Thanks, in the end I took the path from argv[0] instead.
  12. I wrote an opengl program that uses stb_image.h to load png for textures but after I build the program if I execute the exec itself the texture will be black(everything works if I just build and run in xcode). Is there another way to build the project so that the exec will be able to find the image file.
  13. Thanks that worked! No wonder I couldn't see anything before.
  14. Ok I realized that I typed gl_position wrong, now it's compiling correctly but it is still not showing anything.
  15. I changed vertices.size() to indices.size() and GL_UNSIGNED_SHORT to GL_INT. After that I realized that I forgot to multiply the location with mv and projection in the vs shader. After that I used glGetShaderiv to see if I compiled correctly but glGetShaderiv returned GL_FALSE for the vertex shader. I don't see why it's compiling wrong. Did I miss something?
×