UPC on Windows 7

19 views
Skip to first unread message

Lucia Illari

unread,
Oct 1, 2019, 1:04:57 PM10/1/19
to upc-users
Hello, my name is Lucia Illari, I am a 3rd year Physics PhD student at the George Washington University in Washington, DC, and I could not join with my school account so I joined with my personal. My school email is loi...@gwu.edu/loi...@gwmail.gwu.edu. I am taking an Intro to HPC course and the professor would like us to write some code in BUPC. 

I am having some difficulties installing UPC and any help would be appreciated. I was looking at this thread about UPC on Windows (https://upc.lbl.gov/hypermail/upc-users/0542.html) but had difficulty following. This is what I have done so far:

I have Cygwin64 installed and when I type cygcheck -s I see:

Cygwin DLL version info:
        DLL version: 3.0.7
        DLL epoch: 19
        DLL old termios: 5
        DLL malloc env: 28
        Cygwin conv: 181
        API major: 0
        API minor: 338
        Shared data: 5
        DLL identifier: cygwin1
        Mount registry: 3
        Cygwin registry name: Cygwin
        Installations name: Installations
        Cygdrive default prefix:
        Build date:
        Shared id: cygwin1S5 

I have the following packages installed:

autoconf, automake, bash, binutils, coreutils, cvs, emacs, flex, gawk, gcc-core, gcc-g++, gdb, grep, gzip, indent, less, m4, make, moreutils, nano, ncftp, openssh, patch, patchutils, perl, perl_manpages, pinentry, ping, rsync, tar, tcsh, time, vim, wget, zsh

I have also downloaded berkeley_upc-2.28.0.tar.gz and berkeley_upc_translator-2.28.0.tar.gz. My difficulties begin when I check INSTALL.TXT. Step 1 says that we must configure the script. First, I am able to unzip and untar the files, but the mkdir /my/build/directory statement confuses me. When I unzip and untar, I have the folder berkeley_upc-2.28.0, so would C:\Program Files\berkeley_upc-2.28.0 be sufficient? I am able to get to this location through the command

cd cygdrive/c/Program\ Files/berkeley_upc-2.28.0/

I am confused following the INSTALL.TXT at this point. It says

cd /my/build/directory
        <path-to-src>/configure CC=<C compiler> CXX=<C++ compiler> \
                                MPI_CC=<MPI compiler> [options]

but I am not sure what this should be changed to. I tried and got the error

$ cd cygdrive/c/Program\ Files/berkeley_upc-2.28.0/configure CC=<C compiler> CXX=<C++ compiler> \ MPI_CC=<MPI compiler> [options]
-bash: C: No such file or directory

though when I check the berkeley_upc-2.28.0 I see both a file called "configure" and "configure.in". I am not sure where else to go from here. Any help would be appreciated.

Paul Hargrove

unread,
Oct 1, 2019, 4:07:59 PM10/1/19
to Lucia Illari, upc-users
Lucia,

First, please download the latest (2019.4.4) release of Berkeley UPC.
The 2.28.0 release is over a year old.

Second, you do not need (cannot use) berkeley_upc_translator-*.tar.gz on Cygwin.
You will need to use the default (network translation service).

Third, you should not use any location within the /cygdrive directory for the installation, nor would I advise directory names with spaces in them.  So, I would recommend you unpack berkeley_upc-2019.4.4.tar.gz in your home directory.

Finally, you have taken what was two commands with templates for arguments and run them together into a single command without performing any argument substitutions.  Assuming you unpack berkeley_upc-2019.4.4.tar.gz in your home directory, the following four commands should get you through the configure step using all the defaults (for CC, CXX, etc.), including a default installation location of /usr/local/berkeley_upc:

cd $HOME
mkdir bupc-build
cd bupc-build
$HOME/berkeley_upc-2019.4.4/configure

After that you will need to follow the remaining steps in INSTALL.txt to build and install

Hopefully that is sufficient.
If not, please let us know.

-Paul

--
You received this message because you are subscribed to the Google Groups "upc-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to upc-users+...@lbl.gov.
To view this discussion on the web visit https://groups.google.com/a/lbl.gov/d/msgid/upc-users/819d88f9-be59-4702-bc64-0fde1f1136a9%40lbl.gov.


--
Paul H. Hargrove <PHHar...@lbl.gov>
Computer Languages & Systems Software (CLaSS) Group
Computer Science Department
Lawrence Berkeley National Laboratory

Lucia Illari

unread,
Oct 1, 2019, 9:25:17 PM10/1/19
to upc-users, illar...@gmail.com
Hi Paul,

Thanks a lot for the reply, it was very helpful. After the steps you mentioned, I was able to do 

make 
env UPCC_FLAGS= ./upcc --norc --version
make tests-hello

After this step, I see:

       ==== UPC "HELLO WORLD" TESTS SUCCESSFULLY COMPILED ====

Your UPC compilation setup appears to be working for all detected networks:

      smp udp

You should now test UPC runtime operation for each network of interest.
Start by testing the single-node smp/pthreaded network, with a command like:

  ./upcrun -n 2 libupcr-smp-par-test

Next, ensure you are in a proper environment for launching parallel jobs
(eg batch system session, if necessary) and then issue a command like:

  ./upcrun -n 2 libupcr-udp-seq-test

however typing in the command  

./upcrun -n 2 libupcr-smp-par-test

it spits out: 

upcrun: cannot find 'libupcr-smp-par-test' in $PATH

and for the other command it says:

$ ./upcrun -n 2 libupcr-udp-seq-test
upcrun: cannot find 'libupcr-udp-seq-test' in $PATH
 
I have not typed in "make install" yet because of these results, and am not entirely certain what to do next nor how to adjust upcrun.conf file to run jobs correctly on my system. Thank you for taking the time to read this.

Best,
-Lucia


On Tuesday, October 1, 2019 at 4:07:59 PM UTC-4, Paul Hargrove wrote:
Lucia,

First, please download the latest (2019.4.4) release of Berkeley UPC.
The 2.28.0 release is over a year old.

Second, you do not need (cannot use) berkeley_upc_translator-*.tar.gz on Cygwin.
You will need to use the default (network translation service).

Third, you should not use any location within the /cygdrive directory for the installation, nor would I advise directory names with spaces in them.  So, I would recommend you unpack berkeley_upc-2019.4.4.tar.gz in your home directory.

Finally, you have taken what was two commands with templates for arguments and run them together into a single command without performing any argument substitutions.  Assuming you unpack berkeley_upc-2019.4.4.tar.gz in your home directory, the following four commands should get you through the configure step using all the defaults (for CC, CXX, etc.), including a default installation location of /usr/local/berkeley_upc:

cd $HOME
mkdir bupc-build
cd bupc-build
$HOME/berkeley_upc-2019.4.4/configure

After that you will need to follow the remaining steps in INSTALL.txt to build and install

Hopefully that is sufficient.
If not, please let us know.

-Paul

On Tue, Oct 1, 2019 at 10:05 AM Lucia Illari <illar...@gmail.com> wrote:
Hello, my name is Lucia Illari, I am a 3rd year Physics PhD student at the George Washington University in Washington, DC, and I could not join with my school account so I joined with my personal. My school email is loi...@gwu.edu/loi2102@gwmail.gwu.edu. I am taking an Intro to HPC course and the professor would like us to write some code in BUPC. 
To unsubscribe from this group and stop receiving emails from it, send an email to upc-...@lbl.gov.

Paul Hargrove

unread,
Oct 1, 2019, 10:36:37 PM10/1/19
to Lucia Illari, upc-users
Lucia,

Your PATH environment variable is a colon-separated list of directories searched for executables, and the error suggests that it probably does not include the current working directory (aka '.').

You can probably specify an explicit directory of './' as follows:

./upcrun -n 2 ./libupcr-udp-seq-test

OR you can append '.' to your PATH as follows and use the original command:

export PATH=$PATH:.

-Paul

Hello, my name is Lucia Illari, I am a 3rd year Physics PhD student at the George Washington University in Washington, DC, and I could not join with my school account so I joined with my personal. My school email is loi...@gwu.edu/loi...@gwmail.gwu.edu. I am taking an Intro to HPC course and the professor would like us to write some code in BUPC. 
To unsubscribe from this group and stop receiving emails from it, send an email to upc-users+...@lbl.gov.
To view this discussion on the web visit https://groups.google.com/a/lbl.gov/d/msgid/upc-users/f859095b-90ed-4aec-b81c-3379a0385162%40lbl.gov.

Lucia Illari

unread,
Oct 1, 2019, 10:51:31 PM10/1/19
to upc-users, illar...@gmail.com
Hi Paul,

I tried the first option:

$ ./upcrun -n 2 ./libupcr-udp-seq-test
upcrun: './libupcr-udp-seq-test' does not exist or is not an executable

and then tried

$ export PATH=$PATH:.
$ ./upcrun -n 2 libupcr-smp-par-test
upcrun: cannot find 'libupcr-smp-par-test' in $PATH

which I'm guessing means that './libupcr-udp-seq-test' does not exist. When I searched "lib", "libupcr" didn't come up, but "libgasnet", "libplpa", and "upc-lib-required-spec-1.3" did come up, though am unsure if those are related to this. Thank you for you patience in this matter. Should I perhaps try redownloading berkeley_upc-2019.4.4.tar.gz and going through the steps again and seeing if the same problem pops up?

-Lucia
Hello, my name is Lucia Illari, I am a 3rd year Physics PhD student at the George Washington University in Washington, DC, and I could not join with my school account so I joined with my personal. My school email is loi...@gwu.edu/loi2102@gwmail.gwu.edu. I am taking an Intro to HPC course and the professor would like us to write some code in BUPC. 

Paul Hargrove

unread,
Oct 1, 2019, 10:59:05 PM10/1/19
to Lucia Illari, upc-users
Lucia,

Ah, looking closer I see the problem now:
I believe there is a "flaw" in the instructions because they are emitted by a command run in a subdirectory.
Please try again using the following commands instead to verify your build:

./upcrun -n 2 dbg/libupcr-smp-par-test

./upcrun -localhost -n 2 opt/libupcr-udp-seq-test

Note that it is possible the second one will result in messages from your firewall.
If that is the case, then you can disregard the result and not use -network=udp when compiling UPC programs.

-Paul


Hello, my name is Lucia Illari, I am a 3rd year Physics PhD student at the George Washington University in Washington, DC, and I could not join with my school account so I joined with my personal. My school email is loi...@gwu.edu/loi...@gwmail.gwu.edu. I am taking an Intro to HPC course and the professor would like us to write some code in BUPC. 
To unsubscribe from this group and stop receiving emails from it, send an email to upc-users+...@lbl.gov.
To view this discussion on the web visit https://groups.google.com/a/lbl.gov/d/msgid/upc-users/6749ca26-ad07-4c3b-9dd3-06ab7e48906f%40lbl.gov.

Lucia Illari

unread,
Oct 1, 2019, 11:11:46 PM10/1/19
to upc-users, illar...@gmail.com
Paul,

Typing those in, I got

$ ./upcrun -n 2 dbg/libupcr-smp-par-test
-----------------------------------------------------------------------
 WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING

 This application was built from a Berkeley UPC installation that
 was configured and built with these optional features enabled:
        debugging  tracing  statistical collection  debugging malloc
 This usually has a SERIOUS impact on performance, so you should NOT
 trust any performance numbers reported in this program run!!!

 To suppress this message, pass '-quiet' to the upcrun command or set
 the UPC_NO_WARN or UPC_QUIET environment variables.
-----------------------------------------------------------------------
UPCR: UPC threads 0..1 of 2 on HyakuShiki (pshm node 0 of 1, process 0 of 1, pid=28421)
Welcome to Berkeley UPC!!!
 - Hello from thread 0
 - Hello from thread 1

and (I did indeed get a message from my firewall and had to allow access)

$ ./upcrun -localhost -n 2 opt/libupcr-udp-seq-test
UPCR: UPC thread 1 of 2 on HyakuShiki (pshm node 0 of 1, process 1 of 2, pid=28472)
UPCR: UPC thread 0 of 2 on HyakuShiki (pshm node 0 of 1, process 0 of 2, pid=28471)
WARNING: UPC_POLITE_SYNC="1" is set in your environment
         enabling "polite", low-performance synchronization algorithms
Welcome to Berkeley UPC!!!
 - Hello from thread 0
 - Hello from thread 1

So it would appear that the build was successful! Thank you a lot for your help with this. I am going to go ahead and type "make install" as is the last step in INSTALL.TXT.

-Lucia


Hello, my name is Lucia Illari, I am a 3rd year Physics PhD student at the George Washington University in Washington, DC, and I could not join with my school account so I joined with my personal. My school email is loi...@gwu.edu/loi2102@gwmail.gwu.edu. I am taking an Intro to HPC course and the professor would like us to write some code in BUPC. 

Paul Hargrove

unread,
Oct 1, 2019, 11:20:45 PM10/1/19
to Lucia Illari, upc-users
Lucia,

I am pleased to hear things are working now.
Sorry for the unnecessary extra confusion with respect to running the compiled tests.

For what it's worth, the warnings in your output are to be expected based on what I asked you to run.
In general, UPC programs compiled with default arguments to upcc will not produce those.

Once you make install, you will want to append /usr/local/berkeley_upc/bin to your PATH variable to ensure you can use upcc and upcrun without typing their full path.

export PATH=$PATH:/usr/local/berkeley_upc/bin

-Paul

Hello, my name is Lucia Illari, I am a 3rd year Physics PhD student at the George Washington University in Washington, DC, and I could not join with my school account so I joined with my personal. My school email is loi...@gwu.edu/loi...@gwmail.gwu.edu. I am taking an Intro to HPC course and the professor would like us to write some code in BUPC. 
To unsubscribe from this group and stop receiving emails from it, send an email to upc-users+...@lbl.gov.
To view this discussion on the web visit https://groups.google.com/a/lbl.gov/d/msgid/upc-users/9b0f0959-d317-4fda-bef3-0c9448f2a84e%40lbl.gov.

Lucia Illari

unread,
Oct 2, 2019, 12:07:06 AM10/2/19
to upc-users, illar...@gmail.com
Hello Paul,

Thank you for the help, but now I have more questions :)

As an example I was trying to compile hello.upc and I did the following 

$ upcc -o hello -T=4 hello.upc

However, when I go to execute this program with 

$ ./upcrun hello.exe

I get the following error 

upcrun: nodes not specified!  See RUNNING UDP-BASED UPC JOBS in 'man upcrun'

By doing man upcrun I see

-N -nodes <num>
              Specifies  the number of compute nodes to use for execution. See
              the THREAD LAYOUT section of the man page for more details.

And when I try various ways of executing my code I get the following issues

$ ./upcrun -N -nodes 1 hello2.exe
Value "-nodes" invalid for option N (number expected)
 
$ ./upcrun -N -1 hello2.exe
upcrun: Invalid setting -nodes='-1'
 
$ ./upcrun -N 1 hello2.exe
upcrun: nodes not specified!  See RUNNING UDP-BASED UPC JOBS in 'man upcrun'
 
$ ./upcrun -N -nodes=1 hello2.exe
Value "-nodes=1" invalid for option N (number expected)

How would I go about fixing this issue? It seems that whatever I do, I'm not understanding the format for specifying node number.
Hello, my name is Lucia Illari, I am a 3rd year Physics PhD student at the George Washington University in Washington, DC, and I could not join with my school account so I joined with my personal. My school email is loi...@gwu.edu/loi2102@gwmail.gwu.edu. I am taking an Intro to HPC course and the professor would like us to write some code in BUPC. 

Paul Hargrove

unread,
Oct 2, 2019, 12:37:23 AM10/2/19
to Lucia Illari, upc-users
Lucia,

The "nodes not specified" in this case is a reference to which nodes (for instance in a cluster) should be used to run the application, rather than the count.  There are two options to resolve this.

One option is the use of `upcrun -localhost ...` as I had provided as one of the test examples earlier.

However, since you probably don't want to deal with the firewall exception over and over again, I suggest you use the second option: "smp "as the network (actually the use of shared-memory instead of a network).  To do that you can pass `-network=smp` to each compile command, OR place the line `default_network=smp` in the file $HOME/.upccrc to make this the default.

-Paul

Hello, my name is Lucia Illari, I am a 3rd year Physics PhD student at the George Washington University in Washington, DC, and I could not join with my school account so I joined with my personal. My school email is loi...@gwu.edu/loi...@gwmail.gwu.edu. I am taking an Intro to HPC course and the professor would like us to write some code in BUPC. 
To unsubscribe from this group and stop receiving emails from it, send an email to upc-users+...@lbl.gov.
To view this discussion on the web visit https://groups.google.com/a/lbl.gov/d/msgid/upc-users/2594610d-2f6c-4e58-aa28-0089a2059a0d%40lbl.gov.

Lucia Illari

unread,
Oct 2, 2019, 11:22:43 AM10/2/19
to upc-users, illar...@gmail.com
Hi Paul,

Thank you for clarifying! Using

upcc -network=smp hello.upc
upcrun -n 4 a.exe

did indeed work, very exciting. And I was able to add the line default_network=smp in $HOME/.upccrc so that I could type those previous lines in but without having to include -network=smp.

Thanks so much for you help and patience during all this!
Best,
Lucia
Hello, my name is Lucia Illari, I am a 3rd year Physics PhD student at the George Washington University in Washington, DC, and I could not join with my school account so I joined with my personal. My school email is loi...@gwu.edu/loi2102@gwmail.gwu.edu. I am taking an Intro to HPC course and the professor would like us to write some code in BUPC. 
Reply all
Reply to author
Forward
0 new messages