Skip to main content

Posts

Showing posts from 2018

Conducting a High Performance Computing Course

Augmenting Massive Hands-on Labs (MHOL) in Parallel Computing Course Prathamesh Tugaonkar Department of Computer Engineering, Terna Engineering College, Mumbai India tprathamesh21@gmail.com Abstract — Teaching parallel computing is always a challenge as it requires certainly a paradigm shift in thinking from sequential learning to parallel programming. Providing plenty of exercises would work as scaffoldings when monitored and instructed by an instructor.  Let learners come across the errors and try out various ways of solving the problem. Also, computing requires reasonably good architecture. Investing in online HPC (High-Performance Computing) platforms, MOOCs or clusters formation would be of good choice at an initial stage. This paper is the precursor to pedagogy, course outcomes (COs), constructivism, and available architectures that can be readily used for computation with a minimum investment for HPC or Parallel Computing course.   Keywords- ...

Parallel Computing

Parallel Computing- Its all about parallel thinking. Recent technologies, Various discussions, interesting facts about Parallel Computing & high-performance computing will be posted here very soon. ⇋  Stay Tuned Parallely ⇋ PDS Quiz 1 PDS_Quiz 2 PDS_Quiz3 PDS_Quiz 4 PDS_Quiz 5 Course Exit Survey 2019

Quiz

Theory of Computation   Class TE B TE B Quiz 1 TE B Quiz 2 TE B Quiz 3 TE B Quiz 4 TE B Quiz 5 TE B Quiz 6        TE_B_Course_Exit_Survey_TCS        Class TE C TE C Quiz 1 TE C Quiz 2 TE C Quiz 3 TE C Quiz 4 TE C Quiz 5 TE C Quiz 6        TE_C_Course_Exit_Survey_TCS       

Program to multiply two matrices

Hello, I hope you are able to add two matrices as per the previous post. Now, we will go a step further and multiply the matrices. To multiply matrices, it should satisfy the basic condition i.e. number of columns in the first matrix should be equal to the number of rows in the second matrix. Let's try it out. Don't forget to post the screenshot of the output in the comment section. #include <stdio.h> #include<conio.h> void main() {     int mat1[10][10], mat2[10][10], mul[10][10], r1, c1, r2, c2, i, j, k;     clrscr();     printf("Enter rows and column for first matrix: \n");     scanf("%d %d", &r1, &c1);     printf("Enter rows and column for second matrix: \n");     scanf("%d %d",&r2, &c2);     // Column of first matrix should be equal to column of second matrix and     while (c1 != r2)     { printf("Error! column of first matrix ...

Lab Sessions

Hello, Click on Respective Link to Complete the Assignment. Note: You can submit the response only once.  Lab Assignment - B1 Lab Assignment - B2 Lab Assignment - B3 Lab Assignment - A3

Lex - YACC

Try your hands on Lex Tools using C. Store the following code with desired filename having extension .l (dot L) Use Ubuntu operating system for running the code at ease. Code to check whether given number is Positive or Negative . %{ int p=0, n=0,pf=0,nf=0; %} %% [0-9]+ {p++;} -[0-9]+ {n++;} [0-9]*.[0-9]+ {pf++;} -[0-9]*.[0-9]+ {nf++;} %% main() { printf("Enter the data\t"); yylex(); printf("The positive Number %d \n",p); printf("The Positive Float %d \n",pf); printf("The Negative Number %d \n",n); printf("The Negative Float %d \n",nf); } Commands in terminal- lex filename .l gcc lex.yy.c -ll ./a.out

Program to add two square matrices

Hello, Now we will code for addition of matrices. To do that, we have to develop a logic and step by step you should proceed towards the execution of the program. Steps involved in the execution are:  Code for getting dimensions and getting the elements of both the matrix. You are preferably using for loops Print both the matrices on the console Add matrices and print them on the console screen. You are highly encouraged to post the screenshot of the output in the comment section. #include<stdio.h> #include<conio.h> void main() { int i,j,r1,c1,mat1[10][10],mat2[10][10],sum[10][10]; clrscr(); printf("Enter dimensions of a square matrix \n"); scanf("%d %d",&r1,&c1); printf("Enter elements of First Matrix:\n"); for (i = 0; i<r1;i++) { for (j=0;j<c1;j++) { printf("Enter mat1[%d][%d]=",i,j); scanf("%d",&mat1[i][j]); } } printf("Enter elements of Second Matrix:\n"); fo...

Macro Pass 1 and Pass 2

Hello, I presumed that you are aware of various databases needed for the Pass 1 &2. Please provide a following with the input file macroinput.txt I request you to post the screenshot of the output. import java.util.*; import java.io.*; class MntTuple { String name; int index; MntTuple(String s, int i) { name = s; index = i; } public String toString() { return("[" + name + ", " + index + "]"); } } class MacroProcessor { static List<MntTuple> mnt; static List<String> mdt; static int mntc; static int mdtc; static int mdtp; static BufferedReader input; static List<List <String>> ala; static Map<String, Integer> ala_macro_binding; public static void main(String args[]) throws Exception { initializeTables(); System.out.println("===== PASS 1 =====\n"); pass1(); System.out.println("\n===== PASS 2 =====\n"); pass2(); } static void pas...

Absolute Loader

Hello, We will now code for absolute loader scheme. For that, you have to give input code which is stored in SAMPLE_TEC.TXT When asked for Object File Name, please give the name stored in file SAMPLE_TEC.TXT. (i.e. TECPGM) You are encouraged to post the screenshot of the output of the program in comment section. import java.io.*; import java.io.RandomAccessFile.*; import java.lang.*; class absolute { String s,prog_name,obj_name,staddr; long d=0; int i,j,staddr1; //char[] staddr=new char[30]; void display() { try { BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); System.out.print("\nEnter the program name : "); prog_name=br.readLine(); File f=new File("E:/sample_tec.txt"); RandomAccessFile fr=new RandomAccessFile(f,"r"); long size=fr.length(); if(d<size) { s=fr.readLine(); if(s.charAt(0)=='H') { obj_name=s.substring(2,8); System.out.println("Object Program Name From File : "+obj...

MACRO DATABASE

Great to know that you are curious about the databases used in the MACRO Pass1 and Pass2. Here we Go.!!!!! Pass 1: Databases Source Program Output of Source Program to be fed to Pass 2 Macro Definition Table (MDT)- Stores Macro Definitions Macro Name Table(MNT) - Stores the Macro Name that are defined in the Program Macro Definition Table Counter (MDTC) - Indicates next available entry in MDT Macro Name Table Counter (MNTC) - Indicates next available entry in MNT Argument List Array (ALA)-  Stores the index markers for dummy arguments Pass 2: Databases Input Source Program Expanded Source Code i.e  Output for Assembler  Macro Definition Table (MDT)- Created and Maintained by Pass 1 Macro Name Table(MNT) -  Created and Maintained by Pass 1  Macro Definition Table Pointer (MDTP) - Indicate next line used in Expansion. Arguments List Arrays (ALA)- Substitutes arguments for index markers. Example       ...

Write a program to get student information of 5 students using structure.

You are encouraged to post the screenshot of output in comment section. Students information in the form of Roll No, Name, Marks. You can modify the code as per the problem statement.  #include<stdio.h> #include<conio.h> struct students { int rollno; char name[15]; int marks; }s[5]; int main() {  int i;  clrscr();  printf("Enter Student information\n");  for(i=0;i<5;i++)  {   printf("Enter Roll No:\n");   scanf("%d",&s[i].rollno);   printf("Enter name\n");   scanf("%s",&s[i].name);   printf("Enter Marks:\n");   scanf("%d",&s[i].marks); }  printf("Student information is \n");  for(i=0;i<5;i++)  {   printf("\n==================\n");   printf("%d",s[i].rollno);   printf("\n------------------\n");   printf("%s",s[i].name);   printf("\n------------------\n");   printf("%d",s[i].marks); ...

First and Follow

You are encouraged to post screenshots of output in comment section. #include<stdio.h> #include<ctype.h> char a[8][8]; struct firTab {     int n;     char firT[5]; }; struct folTab {     int n;     char folT[5]; }; struct folTab follow[5]; struct firTab first[5]; int col; void findFirst(char,char); void findFollow(char,char); void folTabOperation(char,char); void firTabOperation(char,char); void main() {     int i,j,c=0,cnt=0,n;     char ip;     char b[8];     printf("\nFIRST AND FOLLOW SET \n\nenter number of productions (in format A->B+T)\n");     scanf("%d",&n);     printf("enter the productions \n");     for(i=0;i<n;i++)     {     scanf("%s",&a[i]);      }     fo...